import reshandler from 'services/response-handler'
/*
 * 查询评价
 */
function makeData(response) {
  return Object.assign({}, response, {
    "professional": response.professional || "0",
    "reviews": response.reviews || [],
    "serviceAttitude": response.serviceAttitude || "0",
    "serviceSpeed": response.serviceSpeed || "0"
  })
}
export default function (params, success, fail) {
  // request 
  params = Object.assign({}, params, {
    methodName: "QueryOrderReview"
  })

  // invoke
  this.$.get(params)
    .then(reshandler.success(success, fail, makeData), reshandler.error(fail))
}
